package group.raber.saber.jdbc;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * 分页查询结果
 * Created by tisir<yangsong158@qq.com> on 2017-05-23
 */
public class PaginationQueryResult<T> implements Serializable,Cloneable{
    /** 每页大小 */
    protected int size;
    /** 结果集的总记录条数 */
    protected int rows;
    /** 总记页数 */
    protected int pages;
    /** 当前页索引(从0开始) */
    protected int index;
    /** 分页列表数据 */
    protected List<T> dataList;
    /** 当前页数据的(不分页情况下的概要数据,如:当前页小计等) */
    protected Map<String,Object> summarizes;
    /** 全部数据(不分页情况下的概要数据,如:合计取平均数,最大,最小等) */
    protected Map<String,Object> wholeSummarizes;

    public PaginationQueryResult() {
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public int getRows() {
        return rows;
    }

    public void setRows(int rows) {
        this.rows = rows;
    }

    public int getPages() {
        return pages;
    }

    public void setPages(int pages) {
        this.pages = pages;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public List<T> getDataList() {
        return dataList;
    }

    public void setDataList(List<T> dataList) {
        this.dataList = dataList;
    }

    public Map<String, Object> getSummarizes() {
        return summarizes;
    }

    public void setSummarizes(Map<String, Object> summarizes) {
        this.summarizes = summarizes;
    }

    public Map<String, Object> getWholeSummarizes() {
        return wholeSummarizes;
    }

    public void setWholeSummarizes(Map<String, Object> wholeSummarizes) {
        this.wholeSummarizes = wholeSummarizes;
    }
}
